package com.coder520.mq.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.coder520.queue.QueueSender;
import com.coder520.topic.TopicSender;

@Controller
@RequestMapping("mq")
public class MQTest {
	
	@Autowired
	private QueueSender queueSender;
	@Autowired
	private TopicSender topicSender;
	
	
	@RequestMapping("/test1")
	@ResponseBody
	public String test1() {
		queueSender.send("com.coder520.queue", "俺老孙QUEUE来也");
		topicSender.send("com.coder520.topic", "俺老猪TOPIC来也");
		return "succ";
	}
}
